/*
 * To change this template, choose Tools | Templates,
 * and open the template in the editor.
 */
package com.kedacom.demo.spring.task;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 *
 * @author xiaojinghai
 */
@Component
public class TestJob {

    private static final Logger logger = LoggerFactory.getLogger(TestJob.class);

    @Scheduled(fixedDelay = 1000)
    public void work() {
        if (logger.isDebugEnabled()) {
            logger.debug("work() - start");
        }
        logger.info("Spring Quartz的TestJob任务被调用！");
        if (logger.isDebugEnabled()) {
            logger.debug("work() - end");
        }
    }
}
